home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Business Master (4th Edition)
/
The Business Master - 4th Edition.iso
/
files
/
utilstem
/
ddkey
/
ddkey201.doc
< prev
next >
Wrap
Text File
|
1993-02-26
|
44KB
|
917 lines
_______
____|__ | (R)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
Files included in this release:
DDKEY201.DOC 3UTILS.DOC
DDKEY.COM CTRL.COM
DINSTALL.COM DDK-ORDR.FRM DVORAK.COM
WS.KEY VENDOR.DOC KEYCODE.COM
Update 1.8: Several options were added to the menu:
<A> allows setting a twenty-four hour alarm, <T> gives a
table of ASCII codes, and <P> will print the screen of your
active program to a sequential file, DDKEY.001, DDKEY.002,
etc.
Update 1.9: The cursor may now be set by pressing <->
at the menu. One may now assign macros to key pairs: a user
definable trigger key followed by one of 94 regular ASCII
keys.
Update 1.91: <A>larm now shows the current time as a
reference. <-> includes ability to blank screen.
Update 2.0: DINSTALL, DDKEY installation program for
full customization. At DOS prompt type: DINSTALL DDKEY.COM
Update 2.01: Dropped internal stack (WordStar conflict)
_____________________
DDKEY version 2.01
Copyright 1991, 1992, 1993, David M. Dibble
All rights reserved
2/26/93
A Dynamic DOS Key expander: a tiny but powerful macro
utility. DDKEY was originally written to complement
WordStar, by allowing any key to be redefined, rather than
the "Escape + key" combination that WordStar requires. Those
with 640k RAM may run WordStar and the spelling checker, etc.
completely in memory, but little room is left for a key
redefinition program. Therefore DDKEY was designed to be
small and fast: the TSR program code occupies 6.1k of RAM.
Total memory usage, with the default 1.4k definition buffer,
is 7.5k, for DKEY-0K. For DDKEY an extra 4k is reserved as a
buffer for saving and restoring the screen, so over 11k of
DOS RAM is needed. Had this program been written in C,
instead of in assembly language, it would have been about
seven times larger.
DDKEY is ideal for use on laptops or with large
databases, for working with text or for any sort of
programming. Various features make working with archive
files easier. It should work under DOS 2.0 and later. DDKEY
will pop up only in color text or monochrome mode. DDKEY
automatically senses the enhanced BIOS, and uses self-
modifying code to install the correct version of the program
in memory.
The program itself compresses nicely with LZEXE or
PKLITE to take up little room on disk. Some features include:
* save and load key definition files from command line
* display definitions active in memory, both within another
program, or from the command line
* on-the-fly definitions, optional Record Mode
* variable definition buffer for small and large needs
* a no translate key, one time canceling of definitions
* halt for user entry while a macro is executing
* chain to another macro
* on pop-up, saves and restores screen
* instantly turn DDKEY on/off (active/inactive)
* clear all definitions at once
* a WordStar-type shorthand, assign macros to pairs of keys
* toggle CapsLock on/off from within a macro.
* toggle NumLock on/off from within a macro.
* predetermined pause within an executing macro
* automatic capitalization of letters following a period,
question mark, or exclamation point
* edit or reassign defined keys at any time
* twenty-four hour alarm
* table of ASCII codes always available
* print 80-column text screen to file within any program
* change user cursor at any time
* included utilities to switch Ctrl and CapsLock on the
enhanced keyboard, or to create a Dvorak layout
DDKEY is distributed as shareware, giving users a chance
to try it before they buy it. If you continue to use it, you
are expected to register. The essence of user-supported
software is to provide personal computer users with quality
software without high prices, and yet to provide incentive
for programmers to continue to develop new products. If you
are unfamiliar with this distribution method, please read the
comments at the end of this file. You may pass a copy of
DDKEY along to your friends for evaluation. Please encourage
them to register their copy if they continue to use it.
All registered users will receive a copy of the latest
version of DDKEY. For your shareware payment of $18 ($19 for
3½" disks) you will in addition receive the next available
major update free. You will also receive bonus programs such
as DKEY-0K, discussed later; DEEPLOCK, an easy to use
security program; and FOR-DO, an extension of the DOS FOR
statement.
Commercial, institutional, and government users of DDKEY
must register and pay for their copies of DDKEY within 30
days of first use or their license is withdrawn. Contact the
author for site-license arrangements.
DDKEY IS SUPPLIED AS IS. THE AUTHOR DISCLAIMS ALL
WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
LIMITATION, THE WARRANTIES OF MERCHANTABILITY AND OF FITNESS
FOR ANY PURPOSE. THE AUTHOR ASSUMES NO LIABILITY FOR DAMAGES,
DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE USE OF
DDKEY.
David M. Dibble
12137 Calle Sombra, #213
Moreno Valley, CA 92557
February 26, 1993 U.S.A.
_________________
The command line syntax follows. To install the program
(with the default 1440 byte buffer) type either:
A>DDKEY or A>DDKEY /L FILESPEC
The last loads a key definition file. If DDKEY is not
installed, it will be. Example: DDKEY -L A:WS.KEY, where
the delimiter is either "/" or "-". Once the program is
installed, typing
A>DDKEY
will show definitions active in memory. The program will
only install once. The display here, and with the /L option,
may be redirected to printer, file, or nul. Send definitions
to an ASCII file, and then sort and print it. Typing
A>DDKEY -L FILESPEC_2
when DDKEY is already installed, will cause the definition
file, FILESPEC_2, to be loaded. Any previous key definitions
will be erased. New definitions may be created at any time.
These will be temporary, unless saved to a file with
A>DDKEY /S FILESPEC
If FILESPEC matches the name of a previously saved file, you
will be warned, and given a choice of whether to overwrite or
append. Files may be appended only if the key allotment
values match--that is, the bytes allowed per definition must
be the same. This is an effective way to merge definitions.
After merging, edit the file to remove or reassign duplicate
keys.
When DDKEY is no longer needed, or if it conflicts with
another program, it may be uninstalled with
A>DDKEY /U
Typing DDKEY /H or DDKEY /? will bring up the following help
message:
____________________________________________________________
Usage: DDKEY {/U} {/S filespec} {/O} {/T} {/L filespec}
/S Save definitions /U Uninstall /O Old BIOS calls
/L Load definitions /2-9 Buffer size /T ^6 case Toggle
Commands:
Alt = show defined keys; menu (Esc quits)
PgDn next page 1-9, 0=10 macros/pg
Ret start to define
R record keystrokes within program, end with Alt =
^C clear buffer, set bytes per definition
A twenty-four hour alarm
T table of ASCII codes
P print screen to file for active program
- select cursor type; blank screen
C automatic caps and dialogue
E edit or create macro, insert mode
^@ next key literal
^@^@ DDKEY active/inactive (beeps)
Codes to embed in macro string:
Alt - halt execution for user entry; end entry with Ret
Alt = <Key> chain to a defined macro <Key>
#C/#c CapsLock ON/off
#N/#n NumLock ON/off
#W 3/4 second pause
____________________________________________________________
The buffer size is now variable, with the default
definition buffer being 1440 bytes. This may be incremented
in units of 1440 bytes, that is, /2 equals 2880, and /3
equals 4320. The largest buffer, /9, is equal to 12,960
bytes. This should provide a sufficient range for just about
any need. /1 does not need to be specified; if no digit is
entered the buffer defaults to 1440 bytes.
Because of the way TSRs are loaded, anything above the
default buffer will not exist until DDKEY has been installed.
Therefore large files must be loaded in a two-step process.
To install DDKEY:
A>DDKEY /5 ;create a 7,200 byte buffer
A>DDKEY /L BIGFILE ;load a large file
Once DDKEY has been installed with a large buffer, all
further file loads proceed normally. Small files, meaning
those of 1444 bytes or less, may still be loaded with a
single line. The following is a permissible installation:
A>DDKEY /5/L SMALFILE
This would load a small file into the default buffer, then
DDKEY would go memory resident, creating a large 7,200 byte
buffer. All subsequent loads would use the large buffer.
Since the buffer is variable, the program now checks all key
files to make sure they will fit in the existing buffer. If
the definition file is too large, DDKEY will refuse to load
it. You may change the buffer only when installing DDKEY.
You can, however, uninstall the program, and then reinstall
with any new buffer value /2 to /9.
When the program is first loaded, you will see a sign-on
message, DDKEY 2.01 loaded, or else DXKEY. DXKEY indicates
that the version for the enhanced BIOS has been loaded.
DXKEY allows use of the enhanced BIOS even with older
programs, letting some 47 additional keys be redefined, such
as <Alt Esc>, <Alt Bksp>, <Alt ~>, <Alt .> and, if you have
them, F11 and F12.
With DOS 4.0 or above, use DXKEY. With DOS 2.x, a non-
enhanced DDKEY will automatically load. Those with DOS 3.x
will find themselves betwixt and between. The BIOS is
enhanced, so DXKEY will load, but the DOS uses non-enhanced
calls, and this may cause problems. GW-Basic will hang the
system if INKEY$ is fed an enhanced key. And TSRs that were
written before DOS 4 expect to intercept a non-enhanced key
call to BIOS, so DXKEY will have to be loaded first. If
conflicts arise, either upgrade your programs and utilities
or, more simply, install with:
A>DDKEY /O or A>DDKEY /O /L FILESPEC
This is the letter O for "old" or "original", and it will
force load the non-enhanced version, even if the enhanced
BIOS is present. The /O parameter may be used at any time.
When other parameters such as /O or /T are used, they must
precede the /L option (if present). With /O DDKEY will only
respond to non-enhanced BIOS calls, presumably within older
programs, and will not even pop up at the DOS prompt in DOS
5.0.
ON-THE-FLY DEFINITIONS: Press <Alt =>.
Hit <Alt => to define. You will see the first ten
definitions, and a small menu. Hit <PgDn> or <Space> to see
the next screen of definitions. This is cyclical, and will
start again at the beginning after the last screen has been
viewed.
Hit <Esc> to quit. Other features, such as <^C> for
clear, <P>rtSc, <C>aps, and <E>dit, will be explained later.
Any single digit 1-9, with 0=10, will set the number of
macros displayed on a page.
<Return> or <D> displays the "KEY:" prompt to begin
definitions. To simplify, try this initially with Editing
OFF. Note that from the "KEY:" prompt striking <Alt => will
again return you to the initial definition screen.
With "KEY:" displayed, there are two command keys:
<Backspace> or <Return> (Enter). To end a session: hit
<Return> when prompted for a key. To clear a definition:
hit <Return> after the equals sign. To terminate a
definition: hit <Return>. To delete left: use <Backspace>.
Most of this should seem fairly intuitive. To enter either
of these keys in a definition itself, use the control
equivalent, ^H or ^M, or else use <^Bksp> and <^Ret>. These
last keys will echo as <Bksp> and <Ret>, and that is the code
they will generate.
The four keys, <Tab>, <Bksp>, <Ret>, and <Esc> require
two bytes of storage within a macro string. Their control
equivalents, ^I, ^H, ^M, ^[, which share the same ASCII
value, require only one byte.
When the bytes allocated for a definition are filled,
the program will beep. Either terminate the definition with
a <Return>, or else backspace and edit the macro or use the
chain-to-macro feature discussed below. If the program
refuses input, but does not beep, it probably means you are
trying to enter a two-byte extended character, such as a
function key or Alt key, when there is only one byte of
definition space remaining.
Any key returned by the BIOS may be defined, except for
^Pause. This is a word zero (00 00) and will be interpreted
by DDKEY as a terminator for a key definition file.
EDITING MODE
The current value for editing is shown on the menu. Hit
<E> to toggle this between on and off. Remember that you may
return to the menu from the "KEY:" prompt by hitting <Alt =>.
When editing, in addition to creating macros, you may recall
previous definitions and move throughout them using the
cursor left and right keys. The <Bksp> and <Ret> keys work
as they do for standard definitions, so it is suggested you
familiarize yourself with that mode first. An onscreen
prompt will show additional command keys. To accept a
definition either hit the <Esc> key, or else move to the end
and hit <Ret>. <Shf Tab> allows you to reassign a macro to
another key. DDKEY goes through a macro table from top down,
just as the keys are displayed.
Thus if you have a macro table showing:
<Alt 2> = ...
...
<Alt 8> = ...
you may reassign <Alt 8> as <Alt 2>, then call up <Alt 2> and
reassign it as <Alt 8>. Trying to do this in reverse order
by first renaming <Alt 2> as <Alt 8> will block access to the
original <Alt 8>. No harm is done. Just temporarily
rename the duplicate.
<-> SELECT CURSOR
If you pop up DDKEY from a program with an invisible
cursor, editing will be difficult. At the menu type hyphen
<-> and select 1 to 5 for a standard cursor type: monochrome,
color, block, or none at all. On exit, your original screen
and (presumably invisible) cursor will be restored.
To select a cursor for use outside DDKEY change the
prompt to YES by pressing <U>, then select 1-5.
BLANK SCREEN: At the menu type -9.
RECORD MODE
A Record feature on the main menu now lets you record
macros from within a program. Simply hit <R> and give the
key which will hold the definition. You will then be
returned to your program. All keystrokes you enter will be
recorded to the macro, but DDKEY should be completely
transparent at this point. None of DDKEY's editing keys will
operate. <Bksp> will not correct, <Ret> will not terminate.
When 16 bytes of definition space remain, DDKEY will
begin to chirp or hiccup at each key press. This should be
faint and unobtrusive, but will help to alert you as to how
much space a macro is taking.
When done with the macro, hit <Alt => to terminate. A
beep will tell you the macro has ended, but you will still
remain in your program. If all of the room allotted for a
definition is used, a beep will alert you, and the macro will
terminate. (The one similarity to DDKEY's regular definition
mode is that input will be refused if there is one byte of
definition space remaining and you try to enter a two-byte
extended key, such as a function or Alt key.)
If you make a mistake, finish recording the macro, then
use the <Alt => pop-up, turn Editing ON, and edit the macro
as you normally would.
PAIR OR COMBINATION MACROS
Both WordStar and VDE offer "Esc + Key" macro
combinations as a sort of shorthand. A similar feature is
now available with DDKEY, extending the possible number of
macros considerably, and allowing macro output without
slowing your typing speed. You need no longer worry about
Alt-key conflicts. Also, those restricted to typing with one
hand will find pair macros a relief from hard to reach key
combinations.
With DDKEY the initial or trigger key is user
selectable. For speed in typing choose an ASCII key such as
[, although any key should do as the trigger key. The
trigger key can be defined in pair with any regular,
printable ASCII in the range 33 decimal through 126 decimal.
This means the second key can be any letter, number, or
symbol on the keyboard.
The default trigger key is tilde <~>, although this is
intended for demonstration purposes only. After testing this
feature you will probably want to change the trigger key to
something more useful, or else to turn this feature off.
Define a combination macro at the "KEY:" prompt, in
regular or Record mode, by hitting the trigger key and
following it with a printable ASCII, for example: ~a, ~A,
~3, ~$. In edit mode, you may reassign existing macros to
pair macros. Case matters, so ~a and ~A are completely
different macros. There are 94 possible pairs. The display
should indicate the pair of keys to which you have assigned
the macro. To play back the macro, hit the trigger key and
then its complement, as: ~a, ~A, ~3. In other words, things
are pretty much as you would expect them to be.
In normal shorthand, one types an abbreviation and, if
defined, this is erased by backspacing, then followed with
the macro. This is all right in word processors where it is
normal to backspace and then retype. This doesn't work so
well in other programs, where outputting ~*<Bksp><Bksp> will
throw out some annoying beeps at best, and cause unexpected
results at worst. Therefore DDKEY takes a different
approach. When you type the trigger key, nothing is output
until the next key is struck. If the next key makes a macro
pair, then the macro is sent. If the next key is undefined
as a pair, then both the trigger key and the second key are
output exactly as you typed them. The main thing is not to
be put off by the initial lack of display of the trigger key,
but to just type as you normally would.
Given the above, the trigger key could be the semicolon
for normal prose writing. Then ;a ;h ;H could be words or
phrases, but ;<space> would appear as per normal (the <space>
can never be part of a defined pair).
Type the literal key, ^@, either immediately before or
after the trigger key to keep it from expanding a macro.
There is no penalty for creating a number of pair macros
and saving them to a file. If you later decide to change the
trigger key, then all of your definitions and the displays
will automatically adjust to the new value you selected. See
the section on customizing DDKEY with DINSTALL. As with all
code modification, remember to work only on a program copy.
CLEAR ALL DEFINITIONS FROM MEMORY
You would presumably clear all keys in order to start
another key file. Therefore, once the buffer is clear, you
will be prompted to enter a value for the bytes to be
allotted to each key + definition. The default setting is
48, which allows 30 keys to be defined within the 1,440 byte
buffer. The value 48 includes 2 bytes for the key to be
defined, 1 byte for the final 00, leaving 45 for each
definition. So decide how much room you need for
definitions, and add 3.
To use the 1,440 byte buffer efficiently, choose a value
that evenly divides such as 5, 6, 8, 9, 10, 12, 15, 16, 18,
20, 24, 30, 32, 36, 40, 45, 48, 60, 72, 80, 90, 96 (decimal).
If a number does not divide evenly, any remainder is unused.
Of course, this is only relevant if you intend to fill the
entire buffer.
VARIABLE ENTRY
If <Alt -> is entered in a definition string, it will
cause the macro, when executed, to pause for user entry. All
entered keys will be literal. Terminate variable entry with
<Return>. This can be useful in DOS for entering file names
in a command line. The <Alt -> key may be thought of as a
string of dashes, or as an underline for a fill-in-the-blanks
type of entry. Example definitions:
LHA P <Alt -> *.DOC *.TXT READ*.* | MORE
LHA E <Alt -> *.EXE *.COM
When either of the above macros halt, enter the name of an
LHA archive (the full name if a self-extracting EXE or COM
file). Press <Ret> for the macro to continue. The above
examples could optionally end with a final <Ret>.
TOGGLE CAPSLOCK AND NUMLOCK
Within a definition string, #C will turn on CapsLock,
and #c will turn it off. If you have an IBM AT or better,
your indicator lights will actually display the status of the
lock keys. On other keyboards the CapsLock and NumLock
lights respond only to the corresponding key press, so there
is no visual clue that CapsLock has been turned on. Control
of CapsLock is essential to scriptwriters, who must deal with
margin and capitalization changes every other line. A single
macro could create wide description margins, then conclude
with: #C<Alt ->#c<^M> This would turn on CapsLock, and
begin variable entry (i.e. LIGHTNING FLASHES BEHIND JONES'S
HEAD). Terminating variable entry with a "Return" will then
cause CapsLock to be turned off, and a carriage return to be
executed.
Similarly #N/#n will toggle Numlock on/off within a
macro.
PAUSE OR WAIT
Within a macro string a #W or #w will cause almost a
three-fourths second delay. This is not a toggle, so either
upper or lower case may be used. For a one-and-a-half-second
delay use #w#w. This may be helpful for database users.
WAIT FOR KEY: To have more control over a delay, simply
use variable entry, <Alt ->. Then continue the macro at any
time by pressing <Enter>.
CHAIN TO ANOTHER MACRO
End a macro with <Alt => and then the key you want to
chain to, for example: <Alt =><Alt G>. DO NOT chain a macro
to itself. Chaining to an ASCII key requires three bytes.
Chaining to an extended key requires four bytes.
Defined keys are exactly specified with scan code and
ASCII value, which means that DDKEY distinguishes between
keypad and keyboard keys. Within a macro, however, only the
ASCII value is saved for most keys; the scan code is ignored.
This means the buffer is only about half the size it would
normally be.
Thus keypad numerals and symbols will appear as
duplicates when chaining. If, say, both the keyboard "*" and
the keypad "*" are defined, then an <Alt =>* will chain to
the "*" which occurs first in the definition queue (nearest
the top in the screen display). Note that clearing a key
definition, and then redefining it will result in that key
appearing last in the definition table.
Chain to a pair macro by specifying the concluding ASCII
key; that is, in order to chain to ~H use <Alt =>H.
NO-TRANSLATE KEY
When typing use ^@ to return the next struck key as a
literal, even if it was previously defined. This applies to
<Alt => itself. The ^@ key is the old teletype NUL, and may
be thought of as nullifying any definition.
MAKE DDKEY ACTIVE/INACTIVE
Striking the literal key twice, ^@^@, will make ALL
definitions and features inactive. Useful for turning DDKEY
off while in another program, when you want to use a number
of defined keys with their original values. To reactivate
DDKEY, again strike the literal key twice: ^@^@. Each time
^@^@ is struck you will hear a beep.
AUTOMATIC CAPITALIZATION AND DIALOGUE
Hit <C> at the menu to toggle automatic capitalization.
From a program use <Alt =>, <C>, <Esc>. When on, the next
letter struck after a period, question mark, or exclamation
point will be capitalized. This can be a great convenience
(if not addictive), but it can also be a nuisance, so a
pending capital can be aborted. Striking ^@ shuts off the
capital pending state; it need not be hit directly before the
letter you wish to remain lowercase. Striking any defined
non-letter key will cancel a pending capital. This last
assumes that if a macro has been executed, then the reason
for the capital probably no longer exists.
As an additional quirk for writers, the apostrophe key
(') will generate a quote (") after a period, question mark,
or exclamation point. If an apostrophe directly follows a
comma, excluding spaces, then it will also generate a quote.
The following dialogue was typed without resorting to the
shift key.
"The missing piece to the map." She stretched out
a finger.
"No," he said, "it's only a clever fake. Ryshenko
managed to beat us here. We've been set up."
Note that the apostrophe key not only generates quotes, but
that it functions like a normal apostrophe within a sentence.
I realize the use of double quotes is American usage, and
that some English writers prefer the single quote mark, but
there it is.
ALARM
Press <Alt =><A> to set the alarm. Enter an alarm time
using a.m. or p.m., or use <Return> or <Esc> to leave the
current value unaffected.
The alarm will sound with a rather obnoxious beep. It
should be loud enough to call you back to your desk after a
task requiring a set interval has passed. Helpful for making
sure you get to meetings, or that you catch the beginning of
the nine o'clock movie.
The alarm uses the timer tick, which means that it can
be used on any system, and that it is very accurate. The
alarm is good for twenty-four hours from the current time.
TABLE OF ASCII CODES
Press <Alt =><T>, then use <PgUp> and <PgDn> to cycle
through the ASCII chart. Useful for programmers, or for
those needing printer hex codes. The table can be used for
converting hex to decimal or vice versa.
PRINT SCREEN
Press <Alt =><P> to print your program's active screen
to a file. Like shelling to DOS, this feature should be
treated with a certain reserve. If you have spent two hours
on an installation routine, why not save your work first, and
only then take a screenshot of it?
The screen will be saved in nondocument mode, with a
hard carriage return at the end of each line, and all
trailing spaces removed. The sequential output files,
DDKEY.001, DDKEY.002, and so forth, will be written to the
default drive and directory. Initially, a search will be
made through existing files to find the next sequential
number. Any time DDKEY finds an existing file with the same
number as the one it is trying to write to, it will cancel
the write, advance the counter, and try again.
The screen may print immediately, or it may be necessary
to strike a key first, thus fulfilling the original key
request which DDKEY intercepted. The screen is already in
buffer, and changes to it at this point will not affect the
printed file.
Printing the screen is particularly useful for working
with archives. Large DOC files can be compressed, then
scrolled to the screen and a screenshot taken. In the
following examples, press <P> on the DDKEY menu, then a
second key to print the screen:
PKUNZIP -CM ZIPFILE
LHA P LZHFILE | MORE
A last example takes care of the final possibility in doing a
print screen:
LHA P LZHFILE
Here the file is scrolled to the screen, with <^S> used to
stop the output. Then press <Alt =><P>. You have saved the
screen, but nothing will appear to happen because DOS is
being used to scroll the file. The screen will not print
until either the file is done scrolling, or until you hit
Ctrl-Break to exit. Once DOS is freed, the captured screen
will print. While waiting for a screen to print, do NOT hit
<Alt => again, since this will destroy the screenshot and
abort the print. DDKEY has only one screen buffer, which is
used for both the pop up and the print screen feature.
TOGGLE CASE: CTRL-^ OR ^6
Writing is rewriting. Combining sentences means that
one must often change a capital to a lowercase, or vice
versa. Users of VDE and early users of WordStar have the
very convenient ^^ (WordStar now refers to this as ^6, and to
avoid confusion I will follow this designation). In WordStar
5.5 this command was abolished. DDKEY can restore it.
WordStar uses ^6 to convert hard carriage returns to
soft. WSCHANGE can assign this function to ^N. Otherwise ^N
doesn't do anything but split a line, which is merely ^M^S.
This frees up ^6 for its former use as a case toggle, which
is turned on with DDKEY from the command line:
A>DDKEY /T or A>DDKEY /T /L FILESPEC
This is intended to make this feature accessible from batch
files. The first time /T is used, ^6 becomes a case toggle.
The next time /T is used, it reverts to its default off
state. Thus a batch file might contain the lines:
ddkey /t/l ws.key or ddkey /t/o/l ws.key
ws
ddkey /t/l dos.key
The case toggle only works through WordStar, so you would
remove it immediately on exiting WordStar. The ^6 case
toggle works in insert mode, since virtually all editing is
done with insert on. What it does is use the BIOS to read
the character under the cursor. Then DDKEY issues a ^V to
turn insert off, then sends the reverse case of the character
read, then a ^V to turn insert back on. If the character
under the cursor is not a letter then a ^D is used to move
the cursor to the right.
DKEY-0K (registered only)
Since DDKEY operates in text mode, it should be possible
to save and restore the current video screen by using video
RAM itself. If you have at least a CGA card and a compatible
computer this will save 4k of DOS RAM. DKEY-0K will save the
screen to either 0B400 or 0BD00 depending on whether the
computer is in monochrome or color text mode. Basically,
just try it and see if it works. After an <Alt => pop-up,
the screen should be restored. If so, rename DKEY-0K and use
it. This will work for most people, but not for everyone, so
I am treating DKEY-0K simply as a bonus.
THE KEYPAD DEFINITIONS: WS.KEY
The included definitions are for the keypad of the 84 key
AT-style keyboard. Another use of the keypad would be to hold
formatting code for writing screenplays. In WS.KEY the key
interval value is not 48, but 32, which means 45 keys may be
defined, leaving 30 free for the user.
Paragraph:
Begin/Previous Next Mark Mark to end
(7) (8) (9) (*)
Sentence:
Begin/Previous Next Mark Mark to end
(4) (5) (6) (-)
Quick Down Quick Across Go Marker
(1) (2) (3)
Delete Word Left Place Marker Mark word
(0) (.) (+)
^Backspace also gives "delete word left" (as in PC-Write).
Load DDKEY /L WS.KEY and look at the display. Most
definitions will be self-explanatory. Quick down (1)
generates a series of ^Xs, which WordStar can't handle:
after the first ^X the rest are gobbled. Thus this string is
preceded with the (undocumented) feature ^Q~ which forces
WordStar to accept the macro as given, without losing
keystrokes. Also, it may not be clear from the opening
display, but "delete word left" is <space>^A^T. Without the
initial space, the command might not only wipe out any mess
to the left of the cursor, but also the word to the right.
The definitions assume double-spaced text, with a
WordStar added soft carriage return between paragraphs. To
make them work with single-spaced text, with two hard
carriage returns between paragraphs, make these changes:
<Keypad 8> add ^F to end
<Keypad 9> add ^F before final ^KK
<Keypad *> delete ^A before final ^KK
Corrections or reassignments may be done with DDKEY in edit
mode.
DINSTALL - DDKEY AND DKEY-0K INSTALLATION
DINSTALL changes the default settings in DDKEY to
accommodate your needs. The opening screen contains
instructions, so anyone familiar with DDKEY can run DINSTALL
immediately by typing at the DOS prompt: DINSTALL DDKEY.COM
If you have renamed DDKEY.COM, substitute that name.
Keep an original, unmodified version of DDKEY safe so that
you can refer back to it if problems arise. First-time users
should try the default settings before making any changes.
The first question asks: On the enhanced keyboard, make
duplicate Home, PgUp, etc. keys equivalent to the keypad?
Home on the keypad is 4700, while the duplicate Home is
47E0. If you don't wish to define these keys, you may want
to make them equivalent. Older programs look for an ASCII 0
as the definition of an extended key, and miss the E0 code.
One solution, if a program cannot recognize the duplicate
keys, is to install DDKEY with a /O. The old BIOS
automatically converts all cursor movement keys to the
original keypad values.
Unfortunately the old BIOS cuts down on the definition
possibilities created by the enhanced BIOS, so you may wish to
create your own filter with DINSTALL. (This restores the
DDKEY 1.52 filter, which watches for an E0 ASCII and zeros
it.) If so, answer Y to the first questions.
The remaining options are self-explanatory. The
DINSTALL layout follows, with the default settings enclosed
in square brackets:
On the enhanced keyboard, make duplicate Home, PgUp, etc keys
equivalent to keypad [N]:
Menu and macro display pop-up key [Alt =]:
Leave Shorthand ON [Y]:
Shorthand trigger key [~]:
Record mode, begin speaker click when 5-50 bytes left [16]:
Display 5-14 macros per page [10]:
Automatic Caps toggle is initially OFF [Y]:
Edit mode toggle is initially OFF [Y]:
No translate key, active/inactive key [^@]:
Each definition is allotted 5-96 bytes of space [48]:
Use whatever screen color exists for pop-up display [Y]:
Save current settings? [Y]:
Note that changing the pop-up key, <Alt =>, also changes
the key used to end input in Record Mode.
By default, DDKEY uses whatever screen attributes are
under the cursor when it is popped up. This means the color
display changes to match the current program (though if the
cursor is on highlighting or in a menu, the resulting screen
color can be a bit unexpected). To set your own color from a
chart, answer N when queried about using the existing screen
color. If selected, this is the color the pop-up screen will
always be.
COMMENTS
There are some problems in WordStar arising from the
getchar() function in C, with which WordStar was compiled.
An Alt key cannot have spaces within its definitions; that
is, defining "<Alt G> = one two three" will result in output
of "onetwothree". Also, getchar() reads in an entire macro
at once. When a deletion occurs, WordStar goes to the undo
buffer and clears the getchar() buffer holding the macro, so
everything following a ^T or ^G will be lost. I use WordStar
to define Esc Z as ^T^F^U, then use DDKEY with <Alt T> =
<Esc>Z. A rather roundabout way to do a word transpose, but
it works.
DDKEY does require a small stack of up to 54 bytes.
Professional programs reserve a 150- to 250-byte stack, which
is more than adequate. A program with a zero-byte stack may
have its code overwritten by an <Alt => pop up; if you ever
encounter a problem after a pop up (usually with one specific
program function), this is likely the cause.
Thanks to Eric Isaacson for A86 and to Eric Meyer for
VDE; without them this program would never have been written.
Also thanks to those whose comments and suggestions helped to
improve this program.
OMBUDSMAN - Association of Shareware Professionals
David M. Dibble is a member of the Association of
Shareware Professionals (ASP). ASP wants to make sure that
the shareware principle works for you. If you are unable to
resolve a shareware-related problem with an ASP member by
contacting the member directly, ASP may be able to help. The
ASP Ombudsman can help you resolve a dispute or problem with
an ASP member, but does not provide technical support for
members' products. Please write to the ASP Ombudsman at 545
Grover Road, Muskegon, MI 49442 or send a CompuServe message
via CompuServe Mail to ASP Ombudsman 70007,3536.
NOTES ON SHAREWARE
Shareware distribution gives users a chance to try
software before buying it. If you try a Shareware program
and continue using it, you are expected to register.
Copyright laws apply to both Shareware and
commercial software, and the copyright holder retains all
rights, though shareware authors my grant specific rights to
copy and distribute the software, in some cases requiring
written permission before a commercial disk vendor may copy
their Shareware.
Shareware is a distribution method, not a type of
software. Because the overhead is low, prices are low.
Shareware has the ultimate money-back guarantee--if you don't
use the product, you don't pay for it.
DDKEY is a shareware program and is provided at no
charge to the user for evaluation. Feel free to share it
with your friends, but please do not give it away altered or
as part of another system. If you find this program useful
and find that you continue to use DDKEY after a reasonable
trial period, you must make a registration payment to David
M. Dibble. The $18 registration fee ($19 for 3½" disks) will
license one copy for use on any one computer at any one time.
You must treat this software just like a book. An example is
that this software may be used by any number of people and
may be freely moved from one computer location to another, so
long as there is no possibility of it being used at one
location while it's being used at another: just as a book
cannot be read by two different persons at the same time.
Anyone distributing DDKEY for any kind of remuneration
must first contact David M. Dibble at the above address for
authorization. This authorization will be automatically
granted to distributors recognized by the (ASP) as adhering
to its guidelines for shareware distributors, and such
distributors may begin offering DDKEY immediately (however,
David M. Dibble must still be advised so that the distributor
can be kept up-to-date with the latest version of DDKEY).